4D Chart v13CT Last event |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D Chart v13
CT Last event
|
CT Last event ( area ) -> Function result | ||||||||
Parameter | Type | Description | ||||||
area | Longint |
![]() |
4D Chart area | |||||
Function result | Longint |
![]() |
Code of the code of the last event that occurred in area | |||||
CT Last event returns the code of the last event that occurred in area.
CT Last event can be used in the object method of a 4D Chart area or in an event method installed with CT ON EVENT. CT Last event identifies the event that caused the object or project method to execute. When used with the CT EVENT FILTER command, CT Last event allows you to take action based on a user’s actions.
The following table lists the event codes:
Value | Event |
-1 | All events |
0 | No events |
1 | Area creation |
2 | Area deletion |
4 | Area activated (clicked or brought to the front) |
8 | Area deactivated (area is no longer active) |
16 | Object creation (create, paste, duplicate) |
32 | Object deletion (delete, cut, clear) |
64 | Command-click (not necessarily on object) |
128 | Object was moved (nudge, alignment, move, etc.) |
256 | Object was resized (arrow keys, drag, etc.) |
1024 | Change in selected object(s) |
2048 | Double-click |
4096 | Object was reshaped |
In this example, CT Last event is used in a method installed by CT ON EVENT to identify double-clicks. When a user double-clicks a graph, a custom dialog box is displayed to allow the user to make changes to the graph.
If(CT Last event(Area)=2048) `If it is a double-click
If(CT Get object type(Area;0)=5) `If it is a graph
`Open the custom Change Chart dialog box
CHANGE CHART(Area;CT Get ID(Area;0;1))
End if
End if
Product: 4D Chart
Theme: CT Area Control
Number:
14516
Created: 4D Chart 1